<?php 

/**
 * 连接数据库并返回连接句柄
 */
try{
    $pdo = new PDO('mysql:host=localhost;dbname=restfulapi','root','wzx3410221993');
    return $pdo;
}
catch (Exception $e){
	exit($e->getMessage());
}